import { defineStore } from 'pinia'
const key = 'trade'

// 定义 Store
export const useTradeStore = defineStore('trade', {
  state: () => {
    return {
      trade: window.localStorage.getItem(key) || ''
    }
  },
  actions: {
    setTrade(val: string) {
      this.trade = val
      window.localStorage.setItem(key, val)
    }
  }
})
